<template>
	<view>
		<u-parse :html="content"></u-parse>
	</view>
</template>

<script>
	import {
		getAgreement
	} from "@/common/config/request.js"
	export default {
		data() {
			return {
				// content: `
				// 	<p>露从今夜白，月是故乡明</p>
				// 	<img src="https://cdn.uviewui.com/uview/swiper/2.jpg" />
				// `,
				content:"",
				title:"",
				id:'',
			}
		},
		onLoad(e) {
			this.title=e.title
			// this.id=e.id
			uni.setNavigationBarTitle({
				title:e.title
			})
			this.getAgreements(e.id)
		},
		methods: {
			getAgreements(id){
				getAgreement({}).then(res=>{
					// console.log(res)
					if(res.data.code==1){
						res.data.data.forEach(item=>{
							if(id==item.id){
								// console.log(this.id,item.id)
								this.content=item.content
								console.log(item.content)
							}
						})
					}
				})
			}
		}
	}
</script>

<style>

</style>
